package main.java.indi.zyj.coderecord;

import java.util.Arrays;

public class FindLengthOfLCIS {

    public int findLengthOfLCIS(int[] nums) {

        int len = nums.length;
        int[] dp = new int[len];
        Arrays.fill(dp, 1);
        int res = 1;

        for (int i = 1; i < len; i++) {
            if (nums[i] > nums[i - 1]) {
                dp[i] = Math.max(dp[i], dp[i - 1] + 1);
            }
            res = Math.max(res, dp[i]);
        }

        return res;

    }

}
